#include "player.h"

Player::Player(QObject *parent)
    : QObject{parent}
    , score_(0)
    , is_win_(false)
{}

Player::Player(const QString &name, QObject *parent)
    :Player(parent)

{
    name_ = name;
}

void Player::Set_Name(const QString &name)
{
    name_ = name;
}

const QString &Player::Get_Name() const
{
    return name_;
}

void Player::Set_Role(Role role)
{
    role_ = role;
}

Player::Role Player::Get_Role() const
{
    return role_;
}

void Player::Set_Sex(Sex sex)
{
    sex_ = sex;
}

Player::Sex Player::Get_Sex() const
{
    return sex_;
}

void Player::Set_Direction(Direction direction)
{
    direction_ = direction;
}

Player::Direction Player::Get_Direction() const
{
    return direction_;
}

void Player::Set_Type(Type type)
{
    type_ = type;
}

Player::Type Player::Get_Type() const
{
    return type_;
}

void Player::Set_Score(int score)
{
    score_ = score;
}

int Player::Get_Score() const
{
    return score_;
}

void Player::Set_Is_Win(bool flag)
{
    is_win_ = flag;
}

bool Player::Get_Is_Win() const
{
    return is_win_;
}

void Player::Set_Prev_Player(Player *player)
{
    prev_ = player;
}

void Player::Set_Next_Player(Player *Player)
{
    next_ = Player;
}

Player *Player::Get_Prev_Player()
{
    return prev_;
}

Player *Player::Get_Next_Player()
{
    return next_;
}

void Player::Store_Dispatch_Card(const Card &card)
{
    cards_.Add(card);
}

void Player::Store_Dispatch_Cards(const Cards &cards)
{
    cards_.Add(cards);
}

const Cards &Player::Get_Cards() const
{
    return cards_;
}

void Player::Clear_Cards()
{
    cards_.Clear();
}

void Player::Plared_Hand(const Cards &cards)
{
    cards_.remove(cards);
}

void Player::Set_Pending_Info(Player *player, Cards &cards)
{
    pend_player_ = player;
    pend_cards_ = cards;
}

Player *Player::Get_Pend_Player()
{
    return pend_player_;
}

const Cards &Player::Get_Pend_Cards() const
{
    return pend_cards_;
}

void Player::PrePare_Call_Lord()
{}

void Player::PrePare_Play_Hand()
{}



